<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require_once './db_emp_'
        . 'conn.php';
$conn;
$name = $_POST["name"];
$department = $_POST["department"];
$photo = $_POST["imgurl"];
$birthday = $_POST["birthday"];
$entry = $_POST['entry'];

$sql = "
INSERT INTO `yuangongbiao`.`yuangongbiao` (
`id`,
`name`,
`department`,
`photo`,
`birthday`,
`entry`
)
VALUES (
NULL, '$name', '$department', '$photo', '$birthday', '$entry'
);
";
$result = $conn->query($sql);
if ($result === false) {
    echo "数据库操作失败！！！ ：（";
} else {
    header("Location: zuoye.php");
}
        
